package com.zy.teacherSide.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.teacherSide.dao.TeacherTaskDao;
import com.zy.teacherSide.entity.TeacherTask;
import com.zy.teacherSide.service.ITeacherTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 29787
 */
@Service
public class ITeacherTaskServiceImpl extends ServiceImpl<TeacherTaskDao, TeacherTask> implements ITeacherTaskService {

    @Autowired
    private TeacherTaskDao teacherTaskDao;

    @Override
    public TeacherTask getTeacherTask(Integer courseId, Integer teacherId, Integer classroomId) {
        return teacherTaskDao.getTeacherTask(courseId, teacherId, classroomId);
    }

    @Override
    public List<TeacherTask> getTaskCourseIdAndClassroomId(Integer courseId, Integer classroomId) {
        return teacherTaskDao.getTaskCourseIdAndClassroomId(courseId, classroomId);
    }

    @Override
    public TeacherTask getTeacherTaskByTaskId(Integer courseId, Integer taskId, Integer teacherId, Integer classroomId) {
        return teacherTaskDao.getTeacherTaskByTaskId(courseId, taskId, teacherId,classroomId);
    }

    @Override
    public List<TeacherTask> getTeacherTaskByClassroomIdAndTeacherIdAndCourseId(Integer classroomId, Integer teacherId, Integer courseId) {
        return teacherTaskDao.getTeacherTaskByClassroomIdAndTeacherIdAndCourseId(classroomId, teacherId, courseId);
    }

    @Override
    public List<TeacherTask> getTeacherTaskByTeacherId(Integer teacherId) {
        return teacherTaskDao.getTeacherTaskByTeacherId(teacherId);
    }

    @Override
    public TeacherTask getTeacherTaskByCourseIdAndTaskNameAndTeacherIdAndClassroomId(Integer courseId, String taskName, Integer teacherId, Integer classroomId) {
        return teacherTaskDao.getTeacherTaskByCourseIdAndTaskNameAndTeacherIdAndClassroomId(courseId, taskName, teacherId, classroomId);
    }

}
